import {instance} from "./request";

export function login(data) {

  return  instance.post( '/login',data)
  //  request({
    
  // }).then(res=>console.log(res))
}

export function reserve(data){
  return instance.post('/addResv',{resv:data})
  
}

//获得预约接种的信息
export function getInoDeatails(){
  return instance.get('/inoDeatails')
}
//获得预约记录
export function getReserLogs(inotorId){
  return instance.get(`/resvs/${inotorId}`)
}
//获得接种记录
export function getInoteLogs(inotorId){
  instance.get(`/inLogs/${inotorId}`)
}

//取消预约
export function cancelResv(resvId){
  return instance.delete(`resv/${resvId}`)
}

//获得所有疫苗
export function getVaccines(){
  return instance.get('vaccines')
}

//增加疫苗明细
export function addInoDetail(inoDeatail){
  return instance.post('/addinoDeatail',inoDeatail)
}

export function getSceneryById(id,params=null){
  return instance.get('/scenery/'+id,params)
}